
<div class="row">
	<div class="col-xs-12 col-md-12">

		<div class="widget">

			<div class="widget-header bordered-bottom bordered-themeprimary">
				<i class="widget-icon fa fa-tasks themeprimary"></i>
				<span class="widget-caption themeprimary">仓库列表</span>
				<div class="widget-buttons buttons-bordered">
					<%= button_to '新建仓库', new_warehouse_path, method: :get, :class => "btn btn-blue btn-xs" %>
				</div>

			</div><!--Widget Header-->
			<div class="widget-body">
				<div class="widget-main no-padding">

					<div class="flip-scroll">
						<div class="dataTables_wrapper form-inline no-footer">
							<table class="table table-bordered table-striped table-condensed flip-content">
								<thead class="flip-content bordered-palegreen">
									<tr>
										<th>Name</th>
										<th colspan="4"></th>
									</tr>
								</thead>

								<tbody>
									<% @warehouses.each do |warehouse| %>
									<tr>
										<td><%= warehouse.name %></td>
										<td><%= link_to '添加产品', new_product_path(warehouse), warehouse_id: warehouse.id %></td>
										<td><%= link_to 'Show', warehouse %></td>
										<td><%= link_to 'Edit', edit_warehouse_path(warehouse) %></td>
										<td><%= link_to 'Destroy', warehouse, method: :delete, data: { confirm: 'Are you sure?' } %></td>
									</tr>
									<% end %>
								</tbody>

							</table>
							<div class="row DTTTFooter">
								<div class="col-xs-12 col-md-12">
									<div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
										<%= paginate @warehouses, window: 1, outer_window: 1, remote: true %>
									</div>
								</div>
							</div>

						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

